<template>
  <a-tree-node :key="id" :title="title" :is-leaf="isLeaf">
    <template v-for="(item,key) in children">
      <tree-menu-item :key="key" :id="item.id" :title="item.title" :is-leaf="item.is-leaf" :children="menu.children"></tree-menu-item>
    </template>
  </a-tree-node>
</template>

<script>
import { aTreeNode } from 'ant-design-vue'
export default {
  components: {
    aTreeNode
  },
  name: 'aTreeNode',
  props: {
    data: {
      type: Object,
      default: () => {}
    },
    id: {
      type: [String, Number],
      require: true
    },
    title: {
      type: String,
      require: true
    },
    isLeaf: {
      type: Boolean,
      default: false
    },
    children: {
      type: Array,
      defalut: []
    }
  }
}
</script>
